<template>
	<view class="search_text">
		<u-search :change="search()" placeholder="请输入上平名称或品牌" :inputStyle="style" v-model="keywords" height="68rpx"
			searchIconColor="#ffd8d6" placeholderColor="#ffd8d6" color="#fff" bgColor="#ff8a82"
			:showAction='false'></u-search>
	</view>
</template>

<script>
	export default {
		name: 'search-input',
		data() {
			return {
				keywords: '',
				style: {
					'font-size': '24rpx'
				}
			}
		},
		methods: {
			search() {
				// if (this.keywords.trim()) {
				// 	uni.navigateTo({
				// 		url: '/pages/search/search?keywords=' + this.keywords
				// 	})
				// 	return
				// }
				console.log(this.keywords);
				uni.showToast({
					title: '请输入搜索关键词',
					icon: 'error'
				})
			}
		}
	}
</script>

<style lang="scss">

</style>